package com.javautils.swagger2test.controller;

import com.javautils.swagger2test.pojo.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api("UserController")//@Api对请求类进行说明
public class UserController {

    @ApiOperation("这个一个get方法")  // @ApiOperation用于方法上，对方法进行的说明
    @GetMapping("/hello")
    //@ApiParam 用于方法参数上	为单个方法参数打上标识
    public String hello(@ApiParam(value = "12" ) String name) {
        return "hello swagger";
    }


}
